Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't multiply by constant 1 uselessly in dense #5911

Merged
merged 1 commit into from
Jun 24, 2020

Conversation

t-vi
Copy link
Contributor

@t-vi t-vi commented Jun 24, 2020

PyTorch implements vanilla Linear (without broadcasting) though a function addmm that accepts scalar multipliers. These multipliers are constant 1 typically, so this patch skips the multiplication for this common case.

@siju-samuel @masahi

Copy link
Member

@junrushao junrushao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@masahi masahi merged commit 11815b8 into apache:master Jun 24, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Jun 30, 2020
zhiics pushed a commit to neo-ai/tvm that referenced this pull request Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants